<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("utf-8");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>상품 등록</title>
<!-- bootstrap -->
<link
	href="${pageContext.request.contextPath }/intranet/product/product.css"
	rel="stylesheet">
<script	
	src="${pageContext.request.contextPath }/intranet/product/bootstrap/js/filePreview.js" />

<script type="text/javascript">
	var rs;
	function init() {
		var bmi = document.getElementById("bmin");
		rs = document.getElementById("min");

		bmi.onclick = function() {
			rs.value = bmi.value;

		}
	}
</script>
</head>
<body>

	<%
		String mid = (String) session.getAttribute("Mid");
		mid = "1408M002";
		if (!(mid.equals("1408M002"))) {
	%>

	<script type="text/javascript">
		alert("권한이 없습니다.");
		history.back();
	</script>
	<%
		} else {
	%>

	<div id="PMain">
		<form action="" id="frm" name="frm" method="post"
			enctype="multipart/form-data" onsubmit="return fnSub(this)">
			<div id="PTop" class="panel panel-default" style="height: 120px;">

				<div
					style="width: 445px; float: left; line-height: 120px; font-size: 30px; margin-left: 30px;">
					상품등록</div>
					<input type="button" value="목록"
					style="float: right; margin-top: 75px; margin-right: 13px;"
					class="btn btn-warning btn-sm" onclick="history.back()">
					<input type="submit" value="상품등록"
					style="float: right; margin-top: 75px; margin-right: 13px;"
					class="btn btn-info btn-sm">
	
			</div>

			<div id="PContent" style="margin-top: 20px; height: 470px;"
				class="panel panel-default">
				<div id='previewId' class="panel panel-default"
					style='margin: 30px; margin-right: 15px; float: left; width: 350px; height: 411px; color: black; font-size: 9pt;'></div>
				<div style="text-align: center; float: left;">

					<div style="height: 300px; width: 150px; margin-top: 30px;">
						<div class="menu" style="border-top: 2px solid #eaeaea;">상품명</div>
						<div class="menu">최소한도</div>
						<div class="menu">최대한도</div>
						<div class="menu">대출금리</div>
						<div class="menu">대출기간</div>
						<div class="menu">상환방법</div>
						<div class="menu">파일첨부</div>
						<div
							style="height: 128px; line-height: 128px; border-bottom: 2px solid #eaeaea; border-left: 2px solid #eaeaea; border-right: 2px solid #eaeaea;">상품내용</div>
					</div>
				</div>
				<div
					style="height: 300px; float: left; width: 505px; margin-top: 30px; margin-left: 15px;">
					<div class="menu2">
						<input type="text" class="form-control"
							style="height: 30px; margin-top: 5px;" name='PD_nm'>
					</div>
					<div class="menu2">
						<input type="button" value="100만원" class="btn btn-default"
							id="but" onclick="minb(this.value)"><input type="button"
							value="500만원" id="but" class="btn btn-default"
							onclick="minb(this.value)"><input type="button" id="but"
							value="1,000만원" class="btn btn-default"
							onclick="minb(this.value)">
						<div style="width: 225px; float: right;">
							<input type="text" class="form-control money"
								style="height: 30px;" id="PD_min" name="PD_min">
						</div>
					</div>
					<div class="menu2">
						<input type="button" value="1,000만원" class="btn btn-default"
							onclick="maxb(this.value)" id="but"><input type="button"
							value="3,000만원" class="btn btn-default"
							onclick="maxb(this.value)" id="but"><input type="button"
							value="5,000만원" class="btn btn-default" id="but"
							onclick="maxb(this.value)">
						<div style="width: 225px; float: right;">
							<input type="text" class="form-control money"
								style="height: 30px;" id="PD_max" name="PD_max">
						</div>
					</div>
					<div class="menu2">
						<input id="spinner" class="form-control money" name="PD_rate">
					</div>
					<div class="menu2">
						<input type="button" value="12개월" class="btn btn-default" id="but"
							onclick="prdb(this.value)"><input type="button"
							value="24개월" class="btn btn-default" id="but"
							onclick="prdb(this.value)"><input type="button"
							value="36개월" class="btn btn-default" id="but"
							onclick="prdb(this.value)">
						<div style="width: 225px; float: right;">
							<input type="text" class="form-control money"
								style="height: 30px;" id="PD_prd" name="PD_prd" readonly="readonly">
						</div>
					</div>
					<div class="menu2">
						<input type="button" value="원금균등" class="btn btn-default" id="but"
							onclick="pback(this.value)"><input type="button"
							value="원리금균등" class="btn btn-default" id="but"
							onclick="pback(this.value)"><input type="button"
							value="원금만기" class="btn btn-default" id="but"
							onclick="pback(this.value)">
						<div style="width: 225px; float: right;">
							<input type="text" class="form-control" style="height: 30px; text-align: right;"
								name="PD_pback" id="PD_pback" readonly="readonly">
						</div>
					</div>
					<input type='file' style="margin-top: 3px; margin-bottom: 4px;"
						id='photo' name="PD_fnm" onchange="previewImage(this,'previewId')">

					<div>
						<textarea rows="6" style="margin-top: 5px;" class='form-control'
							name="PD_content"></textarea>
					</div>

				</div>
			</div>

			<div id="PBottom" style="height: 180px;"></div>
		</form>
	</div>
	<%
		}
	%>

</body>
</html>